﻿@{
    <input type="hidden" value="@ViewBag.FromDate" id="dateId" />
    <input type="hidden" value="@ViewBag.ToDate" id="dateId1" /> 
    }

<script type="text/javascript">

    $(document).ready(function () {



        var fromDate = $('#dateId').val();
        var toDate = $('#dateId1').val();


        var oTable2 = $('#attendanceTable').dataTable({

            "bServerSide": true,
            "sAjaxSource": "/Attendance/AjaxGetAttendanceAdmin?fromDate=" + fromDate + '&toDate=' + toDate,
            "bProcessing": true,
            "bAutoWidth": false,
            "sPaginationType": "full_numbers",
            "aoColumns":
[
{ "sName": "Date", "sTitle": "Date", "bVisible": true, "sWidth": 70, "bSortable": true, "fnRender": function (oObj) { return oObj.aData[0]; } },
{ "sName": "EmployeeId", "sTitle": "Employee ID", "sWidth": 100, "bVisible": true, "bSortable": true, "fnRender": function (oObj) { return oObj.aData[1]; } },
{ "sName": "EmployeeName", "sTitle": "Employee Name", "sWidth": 200, "bVisible": true, "bSortable": true, "fnRender": function (oObj) { return oObj.aData[2]; } },
{ "sName": "Total Hours", "sTitle": "Total Hours", "sWidth": 100, "bVisible": true, "bSortable": true, "fnRender": function (oObj) { return oObj.aData[3]; } },
{ "sName": "Status", "sTitle": "Status", "sWidth": 100, "bVisible": true, "bSortable": true, "fnRender": function (oObj) { return oObj.aData[4]; } },
{ "sName": "Arrival", "sTitle": "Arrival Time", "sWidth": 100, "bVisible": true, "bSortable": true, "fnRender": function (oObj) { return oObj.aData[5]; } },
{ "sName": "Leving", "sTitle": "Leving Time", "sWidth": 100, "bVisible": true, "bSortable": true, "fnRender": function (oObj) { return oObj.aData[6]; } },
{ "sName": "", "sTitle": "Action", "sWidth": 100, "bVisible": true, "bSortable": true, "fnRender": function (oObj) { return oObj.aData[7]; } },




]
        });

        oTable2 = $('#attendanceTable').dataTable();





    });
   
</script>

<table class="data display datatable" id="attendanceTable">
					<thead>
                <tr>
                 
                     <th>
                    </th>
                    <th>
                    </th>
                    <th>
                    </th>
                    <th>
                    </th> 
                    <th>
                    </th>                    
                    <th>
                        
                    </th>
                     <th>
                        
                    </th>
                  <th>
                        
                    </th>
                </tr>
            </thead>
					
				</table>
                